Skip to content

Conversation

@CrCliff
Copy link
Contributor

@CrCliff CrCliff commented Mar 20, 2025

[AZURE_ARM] Update AD endpoint for Azure US GovCloud

Description

The AZURE_ARM provider was using the incorrect Active Directory endpoint for the Azure US Government environment.

I was seeing the following error when attempting to use the provider with the environment.

cls = get_driver(Provider.AZURE_ARM)
driver = cls(
    cloud_environment="AzureUSGovernment",
    tenant_id="...",
    subscription_id="....",
    key="...",
    secret="...",
)
# BaseHTTPError: Confidential Client is not supported in Cross Cloud request.

The az cloud list command provides the current AD endpoint.

$ az cloud list
  {
    "name": "AzureUSGovernment",
    "endpoints": {
      "activeDirectory": "https://login.microsoftonline.us",
     // ....
    },
    // ...
  },

After updating the endpoint the service principal authenticates as expected.

Status

  • done, ready for review

Checklist

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

Use active directory endpoint from `az cloud list` output.
@CrCliff CrCliff changed the title Fix US GovCloud AD endpoint for AZURE_ARM provider Update US GovCloud AD endpoint for AZURE_ARM provider Mar 20, 2025
@micafer micafer added this to the v3.9.1 milestone Feb 11, 2026
Copy link
Contributor

@micafer micafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@micafer micafer enabled auto-merge February 11, 2026 10:42
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.34%. Comparing base (124c47d) to head (5767351).
⚠️ Report is 10 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2062   +/-   ##
=======================================
  Coverage   83.34%   83.34%           
=======================================
  Files         353      353           
  Lines       81769    81769           
  Branches     8993     8993           
=======================================
  Hits        68148    68148           
  Misses      10796    10796           
  Partials     2825     2825           
Files with missing lines Coverage Δ
libcloud/common/azure_arm.py 73.02% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@micafer micafer merged commit 171fb28 into apache:trunk Feb 11, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants